taxi.RemoteEngine = function() {

}

taxi.RemoteEngine.prototype.JSON = function(url, data, successHandler,
		faultHandler) {
	$.ajax( {
		url : url,
		dataType : 'json',
		data : data,		
		success : function(result) {
			if (successHandler != undefined) {
				if (result.status > 0) {
					successHandler.invoke( [ result ]);
				} else if (faultHandler != undefined) {
					faultHandler.invoke( [ result ]);
				}
			}
		},
		error : function(result) {
			if (faultHandler != undefined) {
				faultHandler.invoke( [ result ]);
			}
		}
	});

}
